package cn.joeg.app.web.core.def;

import cn.joeg.app.web.core.vo.WidgetDataReq;
import cn.joeg.app.web.core.vo.WidgetDataResp;
import com.ecfront.dew.common.Resp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

public interface BasicWidgetAdapter {

    Logger logger = LoggerFactory.getLogger(BasicWidgetAdapter.class);

    Map<String, Method> methods = new HashMap<>();

    String getCode();

    void loadConfig();

    Resp<WidgetDataResp> dispatch(WidgetDataReq req) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException;


}
